home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1291 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: sable.ox.ac.uk!mert0053
  2. From: mert0053@sable.ox.ac.uk (Michael Brewer)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ Streams and System File Limit
  5. Date: 10 Jan 1996 09:43:15 GMT
  6. Organization: Oxford University, England
  7. Message-ID: <4d01nj$ov2@news.ox.ac.uk>
  8. NNTP-Posting-Host: sable.ox.ac.uk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. When a user's per process limit of open files is reached, and a new
  12. fstream is opened, will the stream's failbit be set? I am getting
  13. segmentation faults at odd times at present, and this problem
  14. disappears when I reduce the number of open files the program
  15. maintains. In fact, most of the open files are created by a library
  16. class that I am using that uses C file routines (i.e. fopen). However,
  17. a test IS made if the file was opened correctly, and I am checking all
  18. of my fstreams for failure after opening. No errors are reported, the
  19. program just dies with segmentation fault (not at the time of the
  20. first use of the stream either). However, when I reduce the number of
  21. objects of the library class (which in turn reduces the number of open
  22. files), there are no segmentation faults.
  23.  
  24. Is it possible for a program to fail like this for the reasons I am
  25. suggesting? Or is it likely that there is something more fundamentally
  26. wrong with my code? By the way, I have of the order of 95-100 files open
  27. when problems occcur.
  28.  
  29. Thanks for your help!
  30.  
  31. Mike.
  32.